export function alert_self(msg,type=0){
    const temp = $(`
        <div class="container-alert">
        
        </div>`)
    temp.css({
        width:"200px",
        height:"60px",
        border:"solid 2px #cefab1",
        backgroundColor:`${type=="su"?'#28a745':"var('--bs-primary')"}`,
        textAlign:"center",
        lineHeight:"60px",
        position:"absolute",
        top:"40px",
        right:"50px",
        color:"#ffffff",
        zIndex:"4"
    })
    temp.text(msg)
    return {
        show(){
            $("body").prepend(temp)
            temp.fadeIn("slow");
        },
        out(){
            temp.fadeOut("slow")
            temp.remove()
        }
    }

    
}